package com.aopcinemas.visitor.model;

import jade.content.Concept;
import jade.content.onto.annotations.SuppressSlot;
import jade.core.AID;

import java.util.ArrayList;
import java.util.List;

import com.aopcinemas.cinema.model.Schedule;

public class Campaign implements Concept {

    private static final long serialVersionUID = 1L;

    private Schedule schedule;
    private Type type;
    private int numberOfParticipant;
    private List<AID> participants = new ArrayList<AID>();

    public Schedule getSchedule() {
        return schedule;
    }

    public void setSchedule(Schedule schedule) {
        this.schedule = schedule;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public int getNumberOfParticipant() {
        return numberOfParticipant;
    }

    public void setNumberOfParticipant(int numberOfParticipant) {
        this.numberOfParticipant = numberOfParticipant;
    }

    @SuppressSlot
    public List<AID> getParticipants() {
        return participants;
    }

    public void setParticipants(List<AID> participants) {
        this.participants = participants;
    }

    public boolean isAllParticipants() {
        return participants.size() == numberOfParticipant;
    }

    public boolean isInParticipants(AID aid) {
        return participants.contains(aid);
    }

    public static enum Type {
        LONE_WOLF, DOUBLE_ROMANTIC, FRIENDS, ALL
    }

}
